﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="RSSFeedsAdd.ascx.cs" Inherits="controls_admin_RSSFeedsAdd" %>
<script type="text/javascript">
    var index = "";
    function getCheck() {
        $("table input[type=checkbox].item").each(function () {
            var checked = $(this).attr("checked");
            if (checked) {
                index = index + $(this).attr("value") + ";";
            }
        });
        $("#<%=hdfCheck.ClientID%>").val(index);
    }
    $(document).ready(function () {
        $("input.del").click(function () {
            getCheck();
            if (index == "") return false;
            else return confirm("Xác nhận xóa !");
        });
        $("input.add").click(function () {
            window.location.replace(window.location.pathname + "?module= RSSFeedsAdd");
        });
    });
</script>
<asp:HiddenField ID="hdfCheck" runat="server" />
<div class="box">
    <!-- box / title -->
    <div class="title">
        <h5 id="txtTitle" runat="server">
            Thêm RSS</h5>
    </div>
    <div id="divMessage" runat="server" />
    <div class="form">
        <div class="fields">
            <div class="field">
                <div class="label">
                    <label class="small-label">
                        Tiêu đề</label></div>
                <div class="input">
                    <asp:TextBox ID="txtFeedTitle" runat="server" CssClass="required medium" MaxLength="500" />
                    <div class="note" id="NOTE_TITLE" runat="server" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label class="small-label">
                        Chọn danh mục</label></div>
                <div class="input">
                    <asp:DropDownList ID="ddlCategories" runat="server" />
                    <div class="note" id="Div1" runat="server" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label class="small-label">
                        Chọn kiểu nội dung</label></div>
                <div class="input">
                    <asp:DropDownList ID="ddlContents" runat="server" CssClass="required select">
                        <asp:ListItem Text="Tin tức" Value="ARTICLES" />
                    </asp:DropDownList>
                    <div class="note" id="Div2" runat="server" />
                </div>
            </div>
            <div class="field">
                <div class="label">
                    <label class="small-label">
                        Thứ tự hiển thị</label></div>
                <div class="input">
                    <asp:TextBox ID="txtSortDisplay" runat="server" CssClass="required x-small number"
                        Text="1" />
                    <div class="note" id="divSortDisplay" runat="server" />
                </div>
            </div>
            <div class="buttons">
                <div class="button ">
                    <div class="highlight">
                        <asp:Button ID="btnSubmit" runat="server" Text="Thêm Mới" OnClick="btnSubmit_Click" />
                    </div>
                    <input type="reset" value="Làm Lại" />
                </div>
            </div>
        </div>
    </div>
</div>
